﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HardPartyList.aspx.cs" Inherits="ZHDJ.PersonalCenter.Module.HardParty.HardPartyList" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>

</head>
<body>
    <form id="form1" runat="server">

        <f:PageManager ID="PageManager1" AutoSizePanelID="RegionPanel1" runat="server" />
        <f:RegionPanel ID="RegionPanel1" ShowBorder="false" runat="server">
            <Regions>
                <f:Region ID="Region1" ShowBorder="false" ShowHeader="false" BodyPadding="5px" Width="250px" Position="Left" Layout="Fit" runat="server">
                    <Items>
                        <f:Tree ID="TreeBranch" Width="650px" EnableCollapse="true"
                            ShowHeader="false" Title="组织" OnNodeCommand="TreeBranch_NodeCommand" runat="server">
                        </f:Tree>
                    </Items>
                </f:Region>
                <f:Region ID="Region2" ShowBorder="false" ShowHeader="false" Position="Center" Layout="VBox" BoxConfigAlign="Stretch" BoxConfigPosition="Left" BodyPadding="5px 5px 5px 0" runat="server">
                    <Items>
                        <f:Form ID="Form2" runat="server" Height="36px" BodyPadding="5px" ShowHeader="false"
                            ShowBorder="false" LabelAlign="Right">
                            <Rows>
                                <f:FormRow ID="FormRow1" runat="server">
                                    <Items>
                                        <f:Panel ID="Panel2" ShowHeader="false" CssClass="formitem" ShowBorder="false"
                                            Layout="HBox" runat="server">
                                            <Items>
                                                <f:TextBox ID="txtTitle" BoxFlex="2" runat="server" EmptyText="在用户名、手机号码、身份证中搜索"
                                                    Label="关键字" LabelAlign="right" Width="150px" LabelWidth="60px">
                                                </f:TextBox>
                                                <f:DropDownList BoxFlex="2" ID="ddlIsPartyWorker" Label=" 党务工作者" LabelAlign="right" runat="server" Required="true" ShowRedStar="true">
                                                    <f:ListItem Value="" Text="==请选择==" />
                                                    <f:ListItem Value="1" Text="是" />
                                                    <f:ListItem Value="0" Text="否" />
                                                </f:DropDownList>
                                                <f:Button ID="btnSearch" Margin="0 0 0 5" runat="server" Text="搜索" OnClick="btnSearch_Click" Icon="SystemSearch"></f:Button>
                                            </Items>
                                        </f:Panel>

                                    </Items>
                                </f:FormRow>
                            </Rows>
                        </f:Form>
                        <f:Grid ID="Grid1" runat="server" BoxFlex="1" ShowBorder="true" ShowHeader="false"
                            EnableCheckBoxSelect="true"
                            DataKeyNames="ID,UserName" AllowSorting="false" OnSort="Grid1_Sort" SortField="UserName"
                            SortDirection="DESC" AllowPaging="true" IsDatabasePaging="true" OnPreDataBound="Grid1_PreDataBound"
                            OnPreRowDataBound="Grid1_PreRowDataBound"
                            OnRowCommand="Grid1_RowCommand" OnPageIndexChange="Grid1_PageIndexChange">
                            <Toolbars>
                                <f:Toolbar ID="Toolbar1" runat="server">
                                    <Items>
                                        <f:Button Hidden="true"  ID="btnDeleteSelected" Icon="Delete" runat="server" Text="删除选中记录" OnClick="btnDeleteSelected_Click">
                                        </f:Button>
                                        <f:ToolbarSeparator runat="server">
                                        </f:ToolbarSeparator>

                                        <f:ToolbarFill ID="ToolbarFill1" runat="server">
                                        </f:ToolbarFill>
                                        <f:Button Hidden="true" ID="btnNew" runat="server" Icon="Add" EnablePostBack="false" Text="新增用户">
                                        </f:Button>
                                        <f:Button Hidden="true"  ID="btnDownTmeplate" runat="server" Icon="ArrowDown" Text="下载模板" OnClientClick="DownTmeplate()"></f:Button>
                                        <f:Button Hidden="true"  ID="btnImport" runat="server" Icon="TableRowInsert" EnablePostBack="false" Text="导入"></f:Button>
                                    </Items>
                                </f:Toolbar>
                            </Toolbars>
                            <PageItems>
                                <f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
                                </f:ToolbarSeparator>
                                <f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数：">
                                </f:ToolbarText>
                                <f:DropDownList ID="ddlGridPageSize" Width="80px" AutoPostBack="true" OnSelectedIndexChanged="ddlGridPageSize_SelectedIndexChanged"
                                    runat="server">
                                    <f:ListItem Text="10" Value="10" />
                                    <f:ListItem Text="20" Value="20" />
                                    <f:ListItem Text="50" Value="50" />
                                    <f:ListItem Text="100" Value="100" />
                                </f:DropDownList>
                            </PageItems>
                            <Columns>
                                <f:RowNumberField Width="35px" EnablePagingNumber="true" />
                                <f:BoundField DataField="UserName" SortField="UserName" ExpandUnusedSpace="true" HeaderText="用户名" />
                                <f:BoundField DataField="MobileNo" SortField="MobileNo" TextAlign="Center" Width="100px" HeaderText="手机号码" />
                                <f:RenderField Width="60px" ColumnID="Gender" DataField="Gender" FieldType="Int"
                                    RendererFunction="renderGender" TextAlign="Center" RendererArgument="Gender" HeaderText="性别">
                                </f:RenderField>
                                <f:BoundField DataField="isPartyWorkerName" SortField="isPartyWorkerName" Width="90px" TextAlign="Center" HeaderText="党务工作者" />
                                <f:BoundField DataField="JoinPartyDate" SortField="JoinPartyDate" Width="90px" TextAlign="Center" DataFormatString="{0:yyyy-MM-dd}" HeaderText="入党时间" />
                              
                                <f:WindowField ColumnID="editField" TextAlign="Center" Icon="Pencil" HeaderText="查看"
                                    WindowID="Window1" DataIFrameUrlFields="LoginID" DataIFrameUrlFormatString="HardPartyEdit.aspx?id={0}"
                                    Width="50px" />
           
                            </Columns>
                        </f:Grid>

                    </Items>
                </f:Region>
            </Regions>
        </f:RegionPanel>

        <f:Window ID="Window1" runat="server" IsModal="true" Hidden="true" Target="Top" EnableResize="true"
            EnableMaximize="true" EnableIFrame="true" IFrameUrl="about:blank" Width="750px"
            Height="500px" OnClose="Window1_Close">
        </f:Window>
        <f:Window ID="WindowPassword" runat="server" IsModal="true" Hidden="true" Target="Top" EnableResize="true"
            EnableMaximize="true" EnableIFrame="true" IFrameUrl="about:blank" Width="330px"
            Height="250px" OnClose="Window1_Close">
        </f:Window>
        <f:Window ID="wImport" runat="server" IsModal="true" Hidden="true" Target="Top" EnableResize="true"
            EnableMaximize="true" EnableIFrame="true" IFrameUrl="about:blank" Width="800px"
            Height="380px" OnClose="Window1_Close" Layout="Fit">
        </f:Window>
        <f:HiddenField ID="hdParentBranchID" runat="server">
        </f:HiddenField>
    </form>
</body>
</html>
<%--<script src=".././../../../Scripts/jquery.min.js"></script>--%>
<script type="text/javascript">

    function renderGender(value) {
        if (value == "1") {
            return "女";
        } else if (value == "0") {
            return "男";
        }
        return "未知";
    };

    function DownTmeplate() {
        window.open("../../../../DownTmeplate/普通成员导入模板.xls");
        return false;
    };
    //    $("#btnDownTmeplate").click(function () {
    //        debugger;
    //        alert(1);
    //        window.open("DownTmeplate/普通成员导入模板.xls");
    //        return false;
    //    });
    //})
</script>

